#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->horizontalScrollBar->setMinimum(100);
    ui->horizontalScrollBar->setMaximum(1920);
    ui->horizontalScrollBar->setSingleStep(100);
    ui->horizontalScrollBar->setValue(476);

    ui->verticalScrollBar->setMinimum(100);
    ui->verticalScrollBar->setMaximum(1080);
    ui->verticalScrollBar->setSingleStep(100);
    ui->verticalScrollBar->setValue(268);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_horizontalScrollBar_valueChanged(int value)
{
    QRect rect = this->geometry();
    this->setGeometry(rect.x(), rect.y(), value, rect.height());
}

void Widget::on_verticalScrollBar_valueChanged(int value)
{

    QRect rect = this->geometry();
    this->setGeometry(rect.x(), rect.y(), rect.width(), value);
}
